package com.azt.api.dto;

import java.io.Serializable;

/**
 * 购物车商品DTO
 * Created by shangwq on 2017/2/20.
 */
public  class CartProduct implements Serializable {
    private Integer skuId;
    private Integer productId;
    private String productName;
    private String picPath;
    private String skuStr;

    private Double price;           //市场价
    private Double memberPrice;     //会员价
    private Double hotPrice;        //爆品价
    private Double cenPrice;        //集采价
    private Integer quantity;       //下单数量
    private Integer stock;          //库存数量

    private boolean hotProduct;     //是否是爆品
    private Double realPrice;       //计算后的单价
    private boolean canBuy;         //是否能购买

    private Integer companyId;
    private String companyName;

    public Integer getSkuId() {
        return skuId;
    }

    public void setSkuId(Integer skuId) {
        this.skuId = skuId;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Double getMemberPrice() {
        return memberPrice;
    }

    public void setMemberPrice(Double memberPrice) {
        this.memberPrice = memberPrice;
    }

    public Double getHotPrice() {
        return hotPrice;
    }

    public void setHotPrice(Double hotPrice) {
        this.hotPrice = hotPrice;
    }

    public Double getCenPrice() {
        return cenPrice;
    }

    public void setCenPrice(Double cenPrice) {
        this.cenPrice = cenPrice;
    }

    public boolean isHotProduct() {
        return hotProduct;
    }

    public void setHotProduct(boolean hotProduct) {
        this.hotProduct = hotProduct;
    }

    /**
     * 获取第一张图片
     * */
    public String getPicPath() {
        if(this.picPath != null && !"".equals(this.picPath)) {
            String[] array = this.picPath.split(";");
            if(array != null && array.length > 0) {
                return array[0];
            }
        }
        return "";
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }

    public String getSkuStr() {
        return skuStr;
    }

    public void setSkuStr(String skuStr) {
        this.skuStr = skuStr;
    }

    public Double getRealPrice() {
        return realPrice;
    }

    public void setRealPrice(Double realPrice) {
        this.realPrice = realPrice;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public boolean isCanBuy() {
        return canBuy;
    }

    public void setCanBuy(boolean canBuy) {
        this.canBuy = canBuy;
    }

}
